aux_source_directory(./Source SOURCE_FILES)
add_executable(${MAIN_PROJECT_NAME} ${SOURCE_FILES})
target_include_directories(${MAIN_PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/Source)
#force use unicode char (wchar_t)
target_compile_definitions(${MAIN_PROJECT_NAME} PRIVATE UNICODE)
#config target settings
target_compile_features(${MAIN_PROJECT_NAME} PRIVATE cxx_std_20)
target_link_libraries(${MAIN_PROJECT_NAME} PRIVATE ${Qt5Widgets_LIBRARIES} ${Live2DCubismCore} spine-cpp)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
    # using Clang
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
    # using GCC
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
    # using Intel C++
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
    # using Visual Studio C++
    target_compile_options(${MAIN_PROJECT_NAME}
        PRIVATE /source-charset:utf-8 /Zc:__cplusplus /Zc:wchar_t /Zc:rvalueCast /Zc:inline /Zc:strictStrings /Zc:throwingNew /Zc:referenceBinding)
endif()
#config test
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
aux_source_directory(./Test TEST_FILES)
create_gtest(AnimePetTest "${TEST_FILES}" "${SOURCE_FILES}" "${Live2DCubismCore};spine-cpp")